<?php
/* 
 * ebiz front
 * 
 * ApplySchoolActing Model
 * 
 * @author M.Wang
 * 
 */
require_once '../app/core/models/BaseDao.php';
require_once '../app/core/db/DBUtil.class.php';
require_once '../app/services/CustomerService.php';

class ApplySchoolActingDao extends BaseDao 
{
    
    private $tableName = "apply_school_actings";
    
    public function __construct($dbUtil){ 
        parent::__construct($dbUtil);
    }
    
    public function saveAgent($param){
        try{
            $sql = "insert into $this->tableName SET 
                `user_id` = '{$param['user_id']}',
				`full_name` = '{$param['full_name']}',
				`email` = '{$param['email']}',
				`age` = '{$param['age']}',
				`sex` = '{$param['sex']}',
				`school` = '{$param['school']}',
				`department` = '{$param['department']}',
				`zhuanye` = '{$param['zhuanye']}',
				`student_id` = '{$param['student_id']}',
				`tel` = '{$param['tel']}',
				`mobile` = '{$param['mobile']}',
				`address` = '{$param['address']}',
				`dormitory_address` = '{$param['dormitory_address']}',
				`remarks` = '{$param['remarks']}',
				`evaluation` = '{$param['evaluation']}',
				`status` = '1',
				`delivery_address_1` = '{$param['address_1']}',
				`delivery_address_2` = '{$param['address_2']}',
				`delivery_address_3` = '{$param['address_3']}',
				`qq` = '{$param['qq']}',
				`dentity_id` = '{$param['dentity_id']}',
				`postal_code` = '{$param['postal_code']}',
				`created` = NOW()
            ";
            return $this->dbUtil->ExecuteQuery($sql, $param);
        }
        catch(Exception $e){
            echo $e->getMessage();  exit();
        }
    }
    
    
}



